//
//  MaintainCell.m
//  Commerce
//
//  Created by xiaofeifei on 15/4/13.
//  Copyright (c) 2015年 fei. All rights reserved.
//

#import "MaintainCell.h"

@implementation MaintainCell

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)configUIWithData:(NSDictionary *)data{
    _nameLabel.text = [data[@"PerName"] isEqual:[NSNull null]]?@"":data[@"PerName"];
    _addressLabel.text = [NSString stringWithFormat:@"地址：%@",data[@"Address"]];
    _KMLabel.text = [NSString stringWithFormat:@"%@公里",[data[@"LineNum"] isEqual:[NSNull null]]?@"0":data[@"LineNum"]];
    NSString *path = [data[@"NewsCoverStr"] stringByReplacingOccurrencesOfString:@"~" withString:@""];
    NSString *imgUrl = [NSString stringWithFormat:@"%@%@",URL_ROOT_PIC,path];
    [_img sd_setImageWithURL:[NSURL URLWithString:imgUrl] placeholderImage:[UIImage imageNamed:@"shortImg.png"]];
}

@end
